package com.yiji.fintech.musfinance.common.domain;

import com.yiji.fintech.musfinance.base.enums.*;
import com.yiji.fintech.musfinance.center.withdraw.order.facade.WithdrawFacadeOrder;
import com.yiji.fintech.musfinance.common.annotation.ChannelContext2Domain;
import com.yiji.fintech.musfinance.common.annotation.Field2Filed;
import com.yiji.fintech.musfinance.common.annotation.Order2Domain2Event;
import com.yiji.fintech.musfinance.common.annotation.RuleStrategyAnnotation;
import com.yiji.fintech.musfinance.common.domain.base.BaseDomain;
import com.yiji.fintech.musfinance.common.enums.ReviewStatusEnum;
import com.yiji.fintech.musfinance.common.eventbus.event.WithdrawEvent;
import com.yiji.fintech.musfinance.common.strategy.converter.Context2WithdrawDomainStrategy;
import com.yiji.fintech.musfinance.common.strategy.enginerules.WithdrawRulesStrategy;
import com.yiji.fintech.musfinance.service.TransactionWithdrawService;
import lombok.Data;

import java.util.Date;

/**
 * Created by ouwen@yiji.com} on 2017/9/26.
 */
@Order2Domain2Event(eventClass = WithdrawEvent.class,
        orderClass = WithdrawFacadeOrder.class,
        dbServiceClass = TransactionWithdrawService.class)
@RuleStrategyAnnotation(strategyClass = WithdrawRulesStrategy.class)
@ChannelContext2Domain(c2dsClass = Context2WithdrawDomainStrategy.class)
@Data
public class WithdrawDomain extends BaseDomain {
    /***************付款方***************/
    /**付款账户名*/
    private String payAccountName;
    /**付款账号*/
    private String payAccountNo;
    /**付款银行名称*/
    private String payBankName;
    /**付款银行编码*/
    private String payBankId;
    /***************收款方***************/
    /** 收款银行名称 */
    private String recBankName;
    /** 收款方银联号 */
    private String recUnionBankNo;
    /**卡号*/
    private String recAccountNo;
    /**户名*/
    private String recAccountName;
    /**银行编码CCB*/
    @Field2Filed(toFiled = "instBankId")
    private String recBankId;
    /**证件号码 对私(身份证号)对公(企业营业执照号)*/
    private String recCertNo;
    /**收款账户类型 对公:CORPORATE / 对私:PERSONAL*/
    @Field2Filed(toFiled = "personalCorporateType")
    private PersonalCorporateTypeEnum recAccountType = PersonalCorporateTypeEnum.PERSONAL;
    /**卡类型*/
    @Field2Filed(toFiled = "cardType")
    private CardTypeEnum recCardType = CardTypeEnum.DEBIT;
    /**证件类型*/
    @Field2Filed(toFiled = "certType")
    private CertTypeEnum recCertType = CertTypeEnum.IDENTITY_CARD;
    /**汇款用途*/
    private String transUsage;
    /**所在省*/
    private String recBankProvince;
    /**预留手机号*/
    private String recMobileNo;
    /**所在市*/
    private String recBankCity;
    /** 通知状态 */
    private NotifyStatusEnum notifyStatus = NotifyStatusEnum.NO;
    /** 发送网关时间 */
    private Date gatewayTime;
    /** 审核状态 */
    private ReviewStatusEnum reviewStatus;
}
